<?php

namespace App\Models;

use App\Models\base\CurrencyModel;
use App\Models\base\SubjectModel;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model as BaseModel;
use Illuminate\Database\Eloquent\Relations\BelongsTo;

class DispatchCostModel extends BaseModel
{
    use HasFactory;

    protected $table = 't_dispatch_cost';

    protected $primaryKey = 'id';

    public $timestamps = false;

    const CREATED_AT = null;
    
    const UPDATED_AT = null;

    protected $guarded = [];

    protected $hidden = [
    ];

    //科目(费用)
    public function subject(): BelongsTo
    {
        return $this->belongsTo(SubjectModel::class, 'subject_id');
    }

    //币种
    public function currency(): BelongsTo
    {
        return $this->belongsTo(CurrencyModel::class, 'currency_id');
    }

}
